package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbPlanGrade entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_PLAN_GRADE", schema = "dbo", catalog = "AGDB")
public class TbPlanGrade implements java.io.Serializable {

	// Fields

	private String pgId;
	private String pgName;
	private String pgDetail;
	private String a;
	private String b;
	private String c;
	private Set<TbPlan> tbPlans = new HashSet<TbPlan>(0);

	// Constructors

	/** default constructor */
	public TbPlanGrade() {
	}

	/** minimal constructor */
	public TbPlanGrade(String pgId, String pgName) {
		this.pgId = pgId;
		this.pgName = pgName;
	}

	/** full constructor */
	public TbPlanGrade(String pgId, String pgName, String pgDetail, String a,
			String b, String c, Set<TbPlan> tbPlans) {
		this.pgId = pgId;
		this.pgName = pgName;
		this.pgDetail = pgDetail;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbPlans = tbPlans;
	}

	// Property accessors
	@Id
	@Column(name = "PG_ID", unique = true, nullable = false, length = 10)
	public String getPgId() {
		return this.pgId;
	}

	public void setPgId(String pgId) {
		this.pgId = pgId;
	}

	@Column(name = "PG_NAME", nullable = false, length = 20)
	public String getPgName() {
		return this.pgName;
	}

	public void setPgName(String pgName) {
		this.pgName = pgName;
	}

	@Column(name = "PG_DETAIL", length = 50)
	public String getPgDetail() {
		return this.pgDetail;
	}

	public void setPgDetail(String pgDetail) {
		this.pgDetail = pgDetail;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbPlanGrade")
	public Set<TbPlan> getTbPlans() {
		return this.tbPlans;
	}

	public void setTbPlans(Set<TbPlan> tbPlans) {
		this.tbPlans = tbPlans;
	}

}